package com.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by  asan
 *
 * @Description: 订单号生成工具，生成非重复订单号
 */
public class MakeBillNoUtil {
    public final static IdWorker idWorker = new IdWorker();

    public static String get() {
        long nowLong = Long.parseLong(new SimpleDateFormat("yyyyMMdd").format(new Date()));
        return nowLong + "00" + idWorker.nextId();
    }

    public static void main(String[] args) {
        for (int i = 0; i < 10000; i++) {
            System.out.println(get());
        }
    }
}
